From: Øyvind Kolås Date: Fri, 21 Jan 2022 23:06:37 +0000 (+0100) Subject: build: enable -ftree-vectorize always, and -mfpu=neon on aarch64 X-Git-Tag: archive/raspbian/1%0.1.106-3+rpi1^2~15^2~4^2~64 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e237d2d473e94a83bc4f5f25680a8f08245f35e0;p=babl.git build: enable -ftree-vectorize always, and -mfpu=neon on aarch64 --- diff --git a/meson.build b/meson.build index a69250b..8c6eebf 100644 --- a/meson.build +++ b/meson.build @@ -93,8 +93,12 @@ elif host_cpu_family == 'ppc64' have_ppc = true conf.set10('ARCH_PPC', true) conf.set10('ARCH_PPC64', true) +elif host_cpu_family == 'arm' + have_arm = true + config.set10('ARCH_ARM', true) endif + host_os = host_machine.system() message('Host os: ' + host_os) @@ -159,7 +163,7 @@ if buildtype == 'debugoptimized' or buildtype == 'release' common_c_flags += cc.get_supported_arguments(['-Ofast']) endif common_c_flags += cc.get_supported_arguments( - ['-fno-unsafe-math-optimizations'] + ['-fno-unsafe-math-optimizations','-ftree-vectorize'] ) extra_warnings_list = [ @@ -181,6 +185,12 @@ else no_undefined = [] endif +if host_cpu_family == 'arm' + arm_neon_flags = cc.get_supported_arguments(['-mfpu=neon']) +elif host_cpu_family == 'aarch64' + common_cflags += cc.get_supported_arguments(['-mfpu=neon']) +endif + ################################################################################ # Check for compiler CPU extensions